﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGe : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGe(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGe obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGe()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGe(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGe() : this(GlobalsPINVOKE.new_OdGe(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public const int eGood = 0;

		public const int eBad = 1;

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public enum EntityId
		{
			kEntity2d,
			kEntity3d,
			kPointEnt2d,
			kPointEnt3d,
			kPosition2d,
			kPosition3d,
			kPointOnCurve2d,
			kPointOnCurve3d,
			kPointOnSurface,
			kBoundedPlane,
			kCircArc2d,
			kCircArc3d,
			kConic2d,
			kConic3d,
			kCurve2d,
			kCurve3d,
			kEllipArc2d,
			kEllipArc3d,
			kLine2d,
			kLine3d,
			kLinearEnt2d,
			kLinearEnt3d,
			kLineSeg2d,
			kLineSeg3d,
			kPlanarEnt,
			kPlane,
			kRay2d,
			kRay3d,
			kSurface,
			kSphere,
			kCylinder,
			kTorus,
			kCone,
			kSplineEnt2d,
			kPolyline2d,
			kAugPolyline2d,
			kNurbCurve2d,
			kDSpline2d,
			kCubicSplineCurve2d,
			kSplineEnt3d,
			kPolyline3d,
			kAugPolyline3d,
			kNurbCurve3d,
			kDSpline3d,
			kCubicSplineCurve3d,
			kTrimmedCrv2d,
			kCompositeCrv2d,
			kCompositeCrv3d,
			kExternalSurface,
			kNurbSurface,
			kTrimmedSurface,
			kOffsetSurface,
			kEnvelope2d,
			kCurveBoundedSurface,
			kExternalCurve3d,
			kExternalCurve2d,
			kSurfaceCurve2dTo3d,
			kSurfaceCurve3dTo2d,
			kExternalBoundedSurface,
			kCurveCurveInt2d,
			kCurveCurveInt3d,
			kBoundBlock2d,
			kBoundBlock3d,
			kOffsetCurve2d,
			kOffsetCurve3d,
			kPolynomCurve3d,
			kBezierCurve3d,
			kObject,
			kFitData3d,
			kHatch,
			kTrimmedCurve2d,
			kTrimmedCurve3d,
			kCurveSampleData,
			kEllipCone,
			kEllipCylinder,
			kIntervalBoundBlock,
			kClipBoundary2d,
			kExternalObject,
			kCurveSurfaceInt,
			kSurfaceSurfaceInt,
			kHelix,
			kSpunSurface,
			kSegmentChain2d,
			kDummy0,
			kDummy1,
			kDummy2,
			kDummy3,
			kDummy4,
			kDummy5,
			kDummy6,
			kDummy7,
			kDummy8,
			kDummy9
		}

		public enum ExternalEntityKind
		{
			kAcisEntity,
			kGe3dCurveEntity,
			kGe3dSurfaceEntity,
			kExternalEntityUndefined
		}

		public enum PointContainment
		{
			kInside,
			kOutside,
			kOnBoundary
		}

		public enum NurbSurfaceProperties
		{
			kUninit,
			kOpen,
			kClosed,
			kPeriodic = 4,
			kRational = 8,
			kNoPoles = 16,
			kPoleAtMin = 32,
			kPoleAtMax = 64,
			kPoleAtBoth = 128
		}

		public enum OffsetCrvExtType
		{
			kFillet,
			kChamfer,
			kExtend
		}

		public enum OdGeXConfig
		{
			kNotDefined = 1,
			kUnknown,
			kLeftRight = 4,
			kRightLeft = 8,
			kLeftLeft = 16,
			kRightRight = 32,
			kPointLeft = 64,
			kPointRight = 128,
			kLeftOverlap = 256,
			kOverlapLeft = 512,
			kRightOverlap = 1024,
			kOverlapRight = 2048,
			kOverlapStart = 4096,
			kOverlapEnd = 8192,
			kOverlapOverlap = 16384
		}

		public enum BooleanType
		{
			kUnion,
			kSubtract,
			kCommon
		}

		public enum ClipError
		{
			eOk,
			eInvalidClipBoundary,
			eNotInitialized
		}

		public enum ClipCondition
		{
			kInvalid,
			kAllSegmentsInside,
			kSegmentsIntersect,
			kAllSegmentsOutsideZeroWinds,
			kAllSegmentsOutsideOddWinds,
			kAllSegmentsOutsideEvenWinds
		}

		public enum ErrorCondition
		{
			kOk,
			k0This,
			k0Arg1,
			k0Arg2,
			kPerpendicularArg1Arg2,
			kEqualArg1Arg2,
			kEqualArg1Arg3,
			kEqualArg2Arg3,
			kLinearlyDependentArg1Arg2Arg3,
			kArg1TooBig,
			kArg1OnThis,
			kArg1InsideThis,
			kNonCoplanarGeometry,
			kDegenerateGeometry,
			kSingularPoint
		}

		public enum csiConfig
		{
			kXUnknown,
			kXOut,
			kXIn,
			kXTanOut,
			kXTanIn,
			kXCoincident,
			kXCoincidentUnbounded
		}

		public enum ssiType
		{
			kSSITransverse,
			kSSITangent,
			kSSIAntiTangent
		}

		public enum ssiConfig
		{
			kSSIUnknown,
			kSSIOut,
			kSSIIn,
			kSSICoincident
		}

		public enum OdGeIntersectError
		{
			kXXOk,
			kXXIndexOutOfRange,
			kXXWrongDimensionAtIndex,
			kXXUnknown
		}

		public enum OdGeKnotParameterization
		{
			kChord,
			kSqrtChord,
			kUniform,
			kCustomParameterization = 15,
			kNotDefinedKnotParam
		}
	}
}
